package ExceptionTest;

public class Test04 {
    public static void main(String[] args) {
        //数组下标越界异常--ArrayIndexOutOfBoundsException
        int[] arr = new int[5];
//        System.out.println(arr[5]);
        //纠错
        int a = 5;
        if (a < arr.length){
            System.out.println(arr[a]);
        }

    }
}
